package com.example.testtouch2;

import com.demo.androidgame.fx.DynamicGameObject;

public class Enemy1 extends DynamicGameObject{

	public static final int EnemyWidth = 1/2 * World.X_BOX;
	public static final int EnemyHeight = 1/2 * World.Y_BOX;
	
	float stateTime;
	public Enemy1(float x, float y) {
		super(x, y, EnemyWidth, EnemyHeight);

		stateTime = 0;
	}
	
	public void update(float deltaTime){
		
		position.add(velocity.x * deltaTime, velocity.y * deltaTime);
        bounds.lowerLeft.set(position).sub(bounds.width / 2, bounds.height / 2);
        
        if(this.position.x > 11 * World.X_BOX){
        	
        	this.position.x = -World.X_BOX;
        	
        }
        
        stateTime += deltaTime;
	}
	
	public void regular(){
		
		velocity.x  = 200.0f;
		
	}
	
	public void hitPlayer(){
		
		velocity.x = 0;
		
	}
}
